package com.lagou.edu.factory;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: lagou-transfer
 * @author: GYL
 * @create: 2020-09-09 22:19
 * @description: 公共接口
 */
public class ApplicationContext implements BeanFactory {
     private static Map<String,Object> map = new HashMap<>();  // 存储对象
    @Override
    public Object getBean(String id) {
        return map.get(id);
    }
    public void put(String key,Object value){
        map.put(key,value);
    }

    public Object get(String key){
        return map.get(key);
    }

    public Boolean containsKey(String key){
        return map.containsKey(key);
    }

}